import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { url } from './src/utils/config';

export default defineConfig({
	plugins: [vue()],
	server: {
		host: '0.0.0.0',
		port: 3001,
		cors: true,
		proxy: {
			'/api': {
				target: url,
				changeOrigin: true,
				rewrite: (path) => path.replace(/^\/api/, '')
			},
		}
	}
});